// <copyright>
// Project: sofort.NET
// Date:  2014 - 02 - 04
// Copyright: Karl Haak 2014
// </copyright>
// <author>Karl Haak (www.karlhaak.de)</author>
namespace pay.sofort.Models.Mapping
{
    public class PaySofortNewTransactionMap : PaySofortBaseMap<PaySofortNewTransaction>
    {
        public PaySofortNewTransactionMap()
        {
            // Primary Key
            HasKey(t => t.PaySofortNewTransactionGuid);

            // Properties
            Property(t => t.transaction_key)
                .IsRequired()
                .HasMaxLength(30);

            Property(t => t.payment_url)
                .IsRequired()
                .HasMaxLength(250);

            // Table & Column Mappings
            ToTable("PaySofortNewTransaction");
            Property(t => t.PaySofortNewTransactionGuid).HasColumnName("PaySofortNewTransactionGuid");
            Property(t => t.transaction_key).HasColumnName("transaction_key");
            Property(t => t.payment_url).HasColumnName("payment_url");
            Property(t => t.warninigs).HasColumnName("warninigs");
        }
    }
}